package com.wust.weibo;

import android.app.ActivityGroup;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;

import com.wust.footprint.FirstActivity;



public class WeiBoGroupTab extends ActivityGroup{
	
	public static ActivityGroup group;  
		
	    @Override  
	    protected void onCreate(Bundle savedInstanceState) {  
	        super.onCreate(savedInstanceState);  
	       // bundle=savedInstanceState;
	        group = this;  
	    }  
	    @Override  
	    public void onBackPressed() {         
	   
	        group.getLocalActivityManager().getCurrentActivity().onBackPressed();     
	    }  
	    @Override  
	    protected void onStart() {  
	        super.onStart();  
	        //要跳转的Activity  
	        Intent intent = new Intent(this, HomeActivity.class);  
	      
	        // 把Activity转换成一个Window，然后转换成View  
	        Window w = group.getLocalActivityManager().startActivity(  
	                "HomeActivity", intent);  
	        View view = w.getDecorView();  
	        //设置要跳转的Activity显示为本ActivityGroup的内容  
	        group.setContentView(view);  
	    }    
	

}
